package com.itheima.dao.impl;

import com.itheima.dao.Studentdao;
import com.itheima.pojo.Student;
import com.itheima.utils.XmlParserUtils;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class StudentdaoA implements Studentdao {

    @Override
    public List<Student> listEmp() {
        String file = this.getClass().getClassLoader().getResource("stu.xml").getFile();

        return  XmlParserUtils.parse(file,Student.class) ;
    }
}
